package com.example.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mapper.MeetingMapper;
import com.example.pojo.careerTalk;
import com.example.pojo.tracking;
import com.example.service.MeetingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class MeetingServiceImpl implements MeetingService {

    @Autowired
    private MeetingMapper meetingMapper;

    //分页展示宣讲会信息
    @Override
    public IPage<careerTalk> findAllTalkList(Page<careerTalk> careerTalkPage) {
        return meetingMapper.findAllTalkList(careerTalkPage);
    }

    //根据类型分类
    @Override
    public IPage<careerTalk> sortByType(String type,Page<careerTalk> careerTalkPage){
        return meetingMapper.sortByType(type,careerTalkPage);
    }

    //根据关键字查询
    @Override
    public IPage<careerTalk> findByKey(String key,Page<careerTalk> careerTalkPage){
        return meetingMapper.findByKey(key,careerTalkPage);
    }

    //叠加查询
    @Override
    public IPage<careerTalk> multiFind(String type, String key, Page<careerTalk> careerTalkPage){
        return meetingMapper.multiFind(type,key,careerTalkPage);
    }

    //删除宣讲会信息
    @Override
    public void deleteMeeting(String name){
         meetingMapper.deleteMeeting(name);
    }

    //编辑宣讲会信息
    @Override
    public void editMeeting(careerTalk c){
        meetingMapper.editMeeting(c);
    }

    //新增宣讲会信息
    @Override
    public void addMeeting(careerTalk c){
        meetingMapper.addMeeting(c);
    }
}
